﻿@model Exam.Web.Models.TicketCreateViewModel
@{
    ViewBag.Title = "Create";
}

<h2>Add Ticket</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset class="form-horizontal">

        <div class="control-group">
            @Html.LabelFor(model => model.CategoryId, "CategoryId", new { @class = "control-label" })
            <div class="controls">
                @Html.DropDownList("CategoryId", String.Empty)
                @Html.ValidationMessageFor(model => model.CategoryId, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Title, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.PriorityId, "PriorityId", new { @class = "control-label" })
            <div class="controls">
                @Html.DropDownList("PriorityId", String.Empty)
                @Html.ValidationMessageFor(model => model.PriorityId, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.ScreenshotUrl, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.ScreenshotUrl)
                @Html.ValidationMessageFor(model => model.ScreenshotUrl, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Description, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="form-actions no-color">
            <input type="submit" value="Add ticket" class="btn" />
        </div>
    </fieldset>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}